#include"List.h"

void TestList1()
{
	ListNode* plist = ListInit();
	ListPushBack(plist, 1);
	ListPushBack(plist, 2);
	ListPushBack(plist, 3);
	ListPushBack(plist, 4);
	ListPrint(plist);

	ListPushFront(plist, 5);
	ListPushFront(plist, 6);
	ListPushFront(plist, 7);
	ListPushFront(plist, 8);
	ListPrint(plist);

	ListPopBack(plist);
	ListPopBack(plist);
	ListPrint(plist);

	ListPopFront(plist);
	ListPopFront(plist);
	ListPrint(plist);

	ListNode* pos1 = ListFind(plist, 2);
	ListInsert(pos1, 20);
	ListPrint(plist);

	ListNode* pos2 = ListFind(plist, 20);
	ListErase(pos2);
	ListPrint(plist);

	ListDestory(plist);
	plist = NULL;
}

int main()
{
	TestList1();
	return 0;
}
